<style>
    h2 {
        font-size: 20px;
    }

    h2 a {
        color: navy;
        text-decoration: none;
        margin-right: 15px;
    }

    h2 a:last-child {
        margin-right: 0;
    }

    h2 a:hover {
        color: brown;
        text-decoration: underline;
    }

    .current {
        color: brown;
    }

    .logged {
        font-size: 16px;
        color: darkcyan;
    }

    .logout {
        margin-left: 20px;
    }

    .logout a {
        text-decoration: none;
        color: cornflowerblue;
    }

    .logout a:hover {
        text-decoration: underline;
    }
</style>

<h1>会员注册管理系统</h1>
<?php
if (isset($_SESSION['loggedUserName']) && $_SESSION['loggedUserName'] != '') { ?>
    <div class='logged'>
        当前登录者:<?php echo $_SESSION['loggedUserName'] ;if($_SESSION['isAdmin']){echo '<span style="color:red;">欢迎管理员登录</span>';} ?><span class='logout'><a href='logout.php'>注销登录</a><span>
    </div>
<?php } ?>
<?php $id = isset($_GET['id']) ? $_GET['id'] : 1; ?>
<h2>
    <a href="./index.php?id=1" <?php if ($id == 1){ ?>class="current"<?php } ?>>首页</a>
    <a href="./singup.php?id=2" <?php if ($id == 2){ ?>class="current"<?php } ?>>会员注册</a>
    <a href="./login.php?id=3" <?php if ($id == 3){ ?>class="current"<?php } ?>>会员登陆</a>
    <a href="./modify.php?id=4" <?php if ($id == 4){ ?>class="current"<?php } ?>>个人资料修改</a>
    <a href="./admin.php?id=5" <?php if ($id == 5){ ?>class="current"<?php } ?>>后台管理</a>
</h2>
